package com.youle.user;

import java.io.File;

import org.junit.Test;

import com.youle.base.COSMETOLOGY_URLCOMMON;
import com.youle.base.InterfaceBaseTest;

public class LoginTest extends InterfaceBaseTest {

	@Override
	public String getUrl() {
		return COSMETOLOGY_URLCOMMON.ONLINETEST_URL;
	}
	
	@Test
	public void checkUser() {
		paramMap.put("method", "user.check");
		paramMap.put("phone", "18688675105");
		paramMap.put("timestamp", System.currentTimeMillis()+"");
	}

	@Test
	public void sendCode(){
		paramMap.put("method", "user.sendCode");
		paramMap.put("phone", "18688675105");
		paramMap.put("type", "1");
		paramMap.put("areaNo", "86");
		paramMap.put("timestamp", System.currentTimeMillis()+"");
	}
	
	@Test
	public void register() {
		paramMap.put("method", "user.register");
		paramMap.put("phone", "18688675105");
		paramMap.put("code", "4764");
		paramMap.put("userPwd", "123456");
		paramMap.put("timestamp", System.currentTimeMillis()+"");
	}

	@Test
	public void login() {
		paramMap.put("method", "user.login");
		paramMap.put("phone", "18171274440");
		paramMap.put("userPwd", "123456");
		paramMap.put("timestamp", System.currentTimeMillis()+"");
	}
	
	@Test
	public void updatePwd() {
		paramMap.put("method", "user.updatePwd");
		paramMap.put("sessionKey", "f7adc28562448eaf6452a18b62707edf");
		paramMap.put("newPwd", "111111");
		paramMap.put("confirmPwd", "111111");
	}
	
	@Test
	public void updateUser() {
		paramMap.put("method", "user.update");
		paramMap.put("sessionKey", "6b0c7c5a7da651331c63dbf290d2de80");
		paramMap.put("birthday", "1989-02-08");
		paramMap.put("sex", "0");
		paramMap.put("skin", "干燥");
		fileMap.put("headImgUrl", new File("F:\\test\\file\\img\\headImg.jpg"));
	}
	
	@Test
	public void resetPwd() {
		paramMap.put("method", "user.resetPwd");
		paramMap.put("phone", "15871383477");
		paramMap.put("code", "5681");
		paramMap.put("newPwd", "111111");
		paramMap.put("confirmPwd", "111111");
	}

}